package ${mapperPackageName};

import ${modelPackageName}.${table.className};
<#assign keyType="" >
<#assign paramsName="" >
<#if table.ids?size gt 1 >
    <#assign keyType="${table.className!}Key" >
    <#assign paramsName="key" >
import ${modelPackageName}.${keyType};
</#if>
<#if table.ids?size == 1 >
    <#assign keyType="${table.ids[0].fieldType}" >
    <#assign paramsName="${table.ids[0].fieldName}" >
</#if>

import java.util.List;

/**
* ${(table.className)!}
*
* User: ${userName}
* DateTime: ${dataTime}
*
*/
public interface ${table.className}Mapper {

    // 根据主键查询对象
    ${table.className} selectByPrimaryKey(${keyType} ${paramsName});

    // 根据条件查询对象
    List<${table.className}> select(${table.className} ${table.className ? uncap_first});

    // 根据主键删除对象
    int deleteByPrimaryKey(${keyType} ${paramsName});

    // 根据条件删除对象
    int delete(${table.className} ${table.className ? uncap_first});

    // 插入对象
    int insert(${table.className} ${table.className ? uncap_first});

    // 更新对象
    int update(${table.className} ${table.className ? uncap_first});

}
